package megrez.bussiness.system.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import megrez.bussiness.system.entity.Dict;
import megrez.bussiness.system.entity.DictDetail;

/**
 * 字典明细数据仓库
 * 
 * @author Lucky Yang
 * @since 0.0.1
 */
public interface DictDetailRepository extends JpaRepository<DictDetail, Long>, JpaSpecificationExecutor<DictDetail> {

    /**
     * 查询
     * 
     * @param dictId 字典
     * @return
     */
    List<DictDetail> findByDict(Dict dict);

    /**
     * 统计字典明细数量
     * 
     * @param dict 字典
     * @return
     */
    long countByDict(Dict dict);

}
